From 28b91a44507811ab3ce5f88e347debe853a77590 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 27 Dec 2019 21:58:54 -0500 Subject: [PATCH] modelbutton: Be focusable This got lost when modelbuttons stopped being derived from buttons. It is necessary, since the GTK focus machinery takes this flag seriously nowadays, and won't let us grab focus to non-focusable widgets. --- gtk/gtkmodelbutton.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c index b40b30c9ce..36d4105fea 100644 --- a/gtk/gtkmodelbutton.c +++ b/gtk/gtkmodelbutton.c @@ -1378,6 +1378,8 @@ gtk_model_button_init (GtkModelButton *self) GtkEventController *controller; GtkGesture *gesture; + gtk_widget_set_can_focus (GTK_WIDGET (self), TRUE); + self->role = GTK_BUTTON_ROLE_NORMAL; self->label = gtk_label_new (""); gtk_widget_set_halign (self->label, GTK_ALIGN_START); -- 2.30.2